export function isFunction (value) {
  return typeof value === 'function'
}
export function isObject (value) {
  return typeof value !== 'object' && value !== null
}
const callbacks = []
function flushCallbacks () {
  callbacks.forEach(cb => {
    cb()
  })
}
let waiting = false
export function nextTick (cb) {
  callbacks.push(cb)
  if (!waiting) {
    setTimeout(() => {
      Promise.resolve().then(flushCallbacks)
      waiting = true
    })
  }

}